package com.hm.service.config.db.ds1;

import com.alibaba.druid.pool.DruidDataSource;

/**
 * hm
 * 主数据源
 */
public class MainDataSource extends DruidDataSource {

    public MainDataSource() {
        //正式环境
        setUrl("jdbc:mysql://172.26.1.16:3306/ConFilter_DB?useSSL=true&serverTimezone=UTC&useUnicode=true&characterEncoding=UTF-8");
        setUsername("root");
        setPassword("Szcg2023@mysqldb*#");
        setDriverClassName("com.mysql.cj.jdbc.Driver");
        setInitialSize(5);
        setMaxActive(100);
        setMinIdle(2);
        setFailFast(true);

        //测试环境
//        setUrl("jdbc:mysql://mysql.sqlpub.com:3306/my_test_db_01?useSSL=true&serverTimezone=UTC&useUnicode=true&characterEncoding=UTF-8");
//        setUsername("root_hm");
//        setPassword("86ed2dc7c06d3d38");
//        setDriverClassName("com.mysql.cj.jdbc.Driver");

    }
}
